#include "stdafx.h"
#include <MMSystem.h>
#include "GameTime.h"
#pragma comment( lib, "winmm.lib" )

void GameTime::Init()
{
	lastTime = timeGetTime();
	elapsedTime = 0;
	worldTime = 0;
}
//----------------------------------------------------------------------------------------------------------------------------------------------------
void GameTime::Update()
{
	unsigned int currentTime = timeGetTime();
	elapsedTime = currentTime - lastTime;
	lastTime = currentTime;
	worldTime += elapsedTime;
}
//----------------------------------------------------------------------------------------------------------------------------------------------------
